
<link rel="stylesheet" href="../../css/comfirmorder.css">
<% Date.prototype.Format = function (fmt) { //author: meizz
    var o = {
        "M+": this.getMonth() + 1,                 //月份
        "d+": this.getDate(),                    //日
        "h+": this.getHours(),                   //小时
        "m+": this.getMinutes(),                 //分
        "s+": this.getSeconds(),                 //秒
        "q+": Math.floor((this.getMonth() + 3) / 3), //季度
        "S": this.getMilliseconds()             //毫秒
    };
    if (/(y+)/.test(fmt))
        fmt = fmt.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length));
    for (var k in o)
        if (new RegExp("(" + k + ")").test(fmt))
            fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length)));
    return fmt;
}
%>
<div class="body">
    <% var amount=0;%>
    <ul>
        <% console.log(reservemesarr)%>
        <li>
            <div class="goods-img">
                <img src="<%= reservemesarr[0].img %>" width="100%">
            </div>
            <div class="goods-desc">
                <p class="desc-name"><%= reservemesarr[0].name %></p>
                <p class="desc-type">成人<%= reservemesarr[0].adultcount %>个 儿童<%= reservemesarr[0].childcount %>个 <span><%=new Date(reservemesarr[0].time_begin).Format('MM.dd')%>-<%=new Date(reservemesarr[0].time_end).Format('MM.dd')%></span></p>
            </div>
            <div class="goods-price">
                <p class="price">￥<%= reservemesarr[0].price %></p>
                <p class="num"><span>x<%= reservemesarr[0].num%></span></p>
            </div>
            <span style="display: none"><% amount+= parseInt(reservemesarr[0].num)* parseFloat(reservemesarr[0].price).toFixed(2) %></span>
        </li>

    </ul>
    <div class="statistics">
        <p>共<span><%= i %></span>个商品 小计：<span>￥</span>
            <span><%= amount%></span>
        </p>
    </div>

    <div class="balance">
        <div class="foot-left">
            <p class="haspay">
                <span>总价:</span> <span class="strong">￥</span><span class="strong"><%=amount%></span>
                <span>支付:</span><span class="strong">10%</span>
                <span class="ding"> 定金 <span class="strong">￥</span><span class="earnest"><%=amount*0.1%></span></span>
            </p>
        </div>
        <div class="foot-right" onclick="RESERVE.reserveime()">确认预定</div>
    </div>
    <div class="backcolor">
    </div>

    <div id="reservemenu" class="reservemenu">
        <div class="confont">
            <div id="closepay" class="closepay">
                <img src="images/close.png" alt="">
            </div>
            <p>确认付款</p>
        </div>
        <p class="payprice"><span>￥</span><span><%=amount*0.1%></span></p>
        <div>
            <p class="paywayselect">
                选择支付方式
            </p>
            <div class="paywayimg">
                <ul>
                    <li onclick="COMFIRMORDER.paysucess('wx')">
                        <div class="payway"><img src="images/weixin.png" alt=""></div>
                        <span>微信支付</span>
                        <div id="wx" class="payselect"><img src="images/selected.png" alt=""></div>
                    </li>
                    <li onclick="COMFIRMORDER.paysucess('ali')">
                        <div class="payway"><img src="images/ali.png" alt=""></div>
                        <span>支付宝支付</span>
                        <div id="ali" class="payselect payout"><img src="images/selected.png" alt=""></div>
                    </li>
                </ul>
            </div>
        </div>
        <div class="paybottom"></div>
    </div>
    <div id="paysuss">
        <div class="paysusimg">
            <img src="images/paysuss.png" width="100%">
        </div>
        <p class="payfont">支付成功</p>
        <div id="conect">

        </div>
    </div>
</div>






<div class="backcolor">
    <div></div>
</div>

<div id="reservemenu" class="reservemenu">
    <div class="confirmpay">
        <div id="closepay" class="closepay">
            <img src="images/close.png" alt="">
        </div>
        <b>确认付款</b>
    </div>
    <div class="paymoney"><span>￥63.00</span></div>
    <div>
        <div class="paywayselect">
            选择支付方式
        </div>
        <div class="paywayimg">
            <ul>
                <li onclick="RESERVE.paysuccess('wx')">
                    <div class="payway"><img src="images/weixin.png" alt=""></div>
                    <span>微信支付</span>
                    <div id="wx" class="payselect"><img src="images/selected.png" alt=""></div>
                </li>
                <li onclick="RESERVE.paysuccess('ali')">
                    <div class="payway"><img src="images/ali.png" alt=""></div>
                    <span>支付宝支付</span>
                    <div id="ali" class="payselect payout"><img src="images/selected.png" alt=""></div>
                </li>
            </ul>
        </div>
    </div>
    <div class="paybottom"></div>
</div>

<script>
    $(".backcolor").click(function (event) {
        $("#reservemenu").hide();
        $(".backcolor").hide();
    });
    $("#closepay").click(function (event) {
        $("#reservemenu").hide();
        $(".backcolor").hide();
    });
</script>